home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Original Code / Paths Regions and Clipping / LineArcCombo / LineArcCombo.cs next >
Encoding:
Text File  |  2001-01-15  |  732 b   |  27 lines

  1. //-------------------------------------------
  2. // LineArcCombo.cs ⌐ 2001 by Charles Petzold
  3. //-------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class LineArcCombo: PrintableForm
  9. {
  10.      public new static void Main()
  11.      {
  12.           Application.Run(new LineArcCombo());
  13.      }
  14.      public LineArcCombo()
  15.      {
  16.           Text = "Line & Arc Combo";
  17.      }
  18.      protected override void DoPage(Graphics grfx, Color clr, int cx, int cy)
  19.      {
  20.           Pen pen = new Pen(clr, 25);
  21.  
  22.           grfx.DrawLine(pen,  25, 100, 125, 100);
  23.           grfx.DrawArc (pen, 125,  50, 100, 100, -180, 180);
  24.           grfx.DrawLine(pen, 225, 100, 325, 100);
  25.      }
  26. }
  27.